<?php //$this->Html->meta("keywords", h($article['Article']['meta_key']), array("inline" => false));?>
<?php //$this->Html->meta("description", h($article['Article']['meta_desc']), array("inline" => false));?>
<?php $this->Html->css('/css/products.css', array("inline" => false));?>
<?php echo $this->element('sub_menu'); ?>
<div class="container mt-10 pt-30 pb-50">
    <div id="Side" class="col-sm-4 col-md-4">
      <h2 class="title-category"><?php echo $categoryDetail['ProductBrand']['brand_name'. $code];?></h2>
      <ul class="right-menu mb-50">
		<?php 
		foreach($categoryList as $key=>$category) : 
			if($key%2==0) $class ='class="odd"';
			else $class ='class="even"';
		?>
        <li <?php echo $class;?>>
            <?php echo $this->Html->link( $category['ProductCategory']['category_name' . $code], array(
                'controller' => 'products',
                'action' => 'category',
                'id' => $category['ProductCategory']['id'],
                'slug' => str_replace(' ', '-', $category['ProductCategory']['category_name_en'])
            ));
            ?>
		</li>
		<?php endforeach;?>
      </ul><!-- /right-menu -->

      <?php echo $this->element('video');?>
    </div><!-- /#Side -->
	
    <div id="Main" class="col-sm-8 col-md-8">
      <section class="row cf mb-40">
        <div class="col-md-12">
          <h2 class="title-h2"><?php echo $categoryDetail['ProductCategory']['category_name'. $code];?></h2>
          <div class="clear">
            <p class="text-01 mb-10 pr-50 bd-b1 pb-20" align="justify">
				<?php echo @$categoryDetail['ProductCategory']['short_des'. $code];?>
			</p>
          </div>
        </div>
      </section><!-- /section -->
      <?php
       $style ='';
       $color = '';
       if($products[0]['Product']['product_category_id'] == 37):
        $style ='style="background-image:url(\'/images/backgroupwebUV.jpg\'); padding-top:15px"';
        $color = 'color:#fff';
       endif;
      ?>
      <section class="product-list row cf mb-40" <?php echo $style?>>
		<?php 
        if(count($products)) :
		foreach($products as $product) :
        ?>
        <div class="col-sm-4 col-md-4">
          <div class="product">
            <div class="img-product effect-product">
              <!--<img src="/files/images/<?php echo $product['Product']['image'];?>" alt="" class="img-responsive" />
              <a href="/products/view/<?php echo $product['Product']['product_id'];?>" class="product-quickview btn btn-quickview">Quick View</a>-->
              <?php echo $this->Html->image('/files/images/'. $product['Product']['image'], array('class' => 'img-responsive', 'url' => array(
                  'controller' => 'products',
                  'action' => 'view',
                  'id' => $product['Product']['product_id'],
                  'slug' => str_replace(' ', '-', $product['Product']['alias'])
                )
              ));
              ?>
            </div>
            <h3 class="align-center title-02">
                <!--<?php echo $product['Product']['name' . $code];?>-->
                <?php echo $this->Html->link( $product['Product']['name' . $code], array(
                  'controller' => 'products',
                  'action' => 'view',
                  'id' => $product['Product']['product_id'],
                  'slug' => ($product['Product']['alias'])?str_replace(' ', '-',$product['Product']['alias']):str_replace(' ', '-', $product['Product']['name_en'])
                ), 
                array('style' => $color )
              );
              ?>
            </h3>
          </div>
        </div>
		<?php endforeach;?>
        <?php else:?>
		<div class="col-sm-4 col-md-4"><?php echo __('We are updating...')?></div>
		<?php endif;?>
		
      </section><!-- /section -->
	  
	  <?php if($this->Paginator->counter('{:pages}') > 1) :?>
        <div class="pagging">
            <ul>
            <?php echo $this->Paginator->numbers(array('separator' => '', 'tag' => 'li', 'currentClass' => 'current'));?>
            </ul>
        </div>
        <?php endif;?>
	
	
    </div><!-- /#Main -->
</div><!-- /container -->